/**  
* <p>Title: PortalStateMachDao.java</p>  
* <p>Description: </p>  
* <p>Copyright: Copyright (c) 2018</p>  
* <p>Company: www.efastserv.com</p>  
* @author zhulin  
* @date 2018年6月25日  
* @version 1.0  
*/
package com.efast.cafe.commponent.statemach.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.efast.cafe.portal.bean.company.PortalCompanyUserBean;
import com.efast.cafe.portal.bean.statemach.PortalStateMachConfBean;
import com.efast.cafe.portal.bean.statemach.PortalStateMachField;
import com.efast.cafe.portal.bean.statemach.PortalStateMachHandleBean;
import com.efast.cafe.portal.bean.statemach.PortalStateMachNoticeBean;
import com.efast.cafe.portal.bean.statemach.PortalStateMachStateBean;

/**
 * @author Administrator
 *
 */
public interface PortalStateMachDao {
	public PortalCompanyUserBean getCompanyUserBeanForNotice(@Param(value = "valueName") String valueName,
			@Param(value = "tableName") String tableName, @Param(value = "id") String id,
			@Param(value = "companyCode") String companyCode);

	/**
	 * 获取流程状态
	 * @param id
	 * @return
	 */
	public Long getState(@Param(value = "id") Long id);
	
	/**
	 * 根据配置ID获取配置信息
	 * 
	 * @param Confid
	 * @return
	 */
	public PortalStateMachConfBean queryConfById(@Param(value = "confId") Long confId);
	
	/**
	 * 根据配置ID获取状态
	 * 
	 * @param ConfId
	 * @return
	 */
	public List<PortalStateMachStateBean> queryStateListByConfId(@Param(value = "confId") Long ConfId);
	
	/**
	 * 根据关系获取操作列表
	 * 
	 * @param confId
	 * @param stateId
	 * @return
	 */
	public List<PortalStateMachHandleBean> queryHandleListByRel(@Param(value = "confId") Long confId,
			@Param(value = "stateId") Long stateId);
	
	
	/**
	 * 根据配置id和状态id查询消息配置
	 * 
	 * @param confId
	 * @param stateId
	 * @return
	 */
	public List<PortalStateMachNoticeBean> queryNoticeListByStateId(@Param(value = "confId") Long confId,
			@Param(value = "stateId") Long stateId);
	
	/**
	 * 根据流程和状态获取entity的display配置
	 * @param confId
	 * @param stateId
	 * @param entityName
	 * @param companyCode
	 * @param systemVer
	 * @param systemInd
	 * @return
	 */
	List<PortalStateMachField> getFieldForStateMach(@Param(value = "confId") Long confId,
			@Param(value = "stateId") Long stateId, @Param(value = "entityName") String entityName,
			@Param(value = "companyCode") String companyCode, @Param(value = "systemVer") String systemVer,
			@Param(value = "systemInd") String systemInd);

}
